fix(backups): reject standby backup actions and harden async replication#1587
Draft
marceloneppel wants to merge 4 commits intomainfrom
Draft
fix(backups): reject standby backup actions and harden async replication#1587marceloneppel wants to merge 4 commits intomainfrom
marceloneppel wants to merge 4 commits intomainfrom
Conversation
Fail create-backup, list-backups, and restore on standby clusters with explicit guidance to run those actions on the primary cluster. Also guard async replication relation handling when no remote units are present yet, preventing uncaught StopIteration during create-replication. Add unit coverage for both fixes, add a Juju3 Ceph-backed integration test for async replication backup behavior, and switch microceph TLS setup to a non-loopback host IP. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1587 +/- ##
==========================================
+ Coverage 75.85% 75.97% +0.12%
==========================================
Files 17 17
Lines 4489 4516 +27
Branches 687 694 +7
==========================================
+ Hits 3405 3431 +26
+ Misses 850 849 -1
- Partials 234 236 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
In async replication setups, backup actions on standby clusters should fail with clear guidance to run on the primary cluster. Today those actions can still run and fail later with less actionable errors.
Also,
create-replicationcould fail when the relation exists but remote units have not published their addresses yet, and relation-changed re-emission could run before any related unit exists.Solution
PostgreSQLBackupsand fail early forcreate-backup,list-backups, andrestorewith explicit action-specific messages.Checklist
Port of #1602.